package com.guoqiang.oop;

public class Demo01 {
    public static void main(String[] args) {

        Cat cat1 = new Cat();
        cat1.name = "小黑猫";
        cat1.color = "black";
        cat1.age = 3;

        Cat cat2 = new Cat();
        cat2.name = "小白猫";
        cat2.color = "white";
        cat2.age = 5;

        System.out.println("第一只猫的信息:" + cat1.name + cat1.color + cat1.age);
        System.out.println("第二只猫的信息:" + cat2.name + cat2.color + cat2.age);

    }
}

//定义一个猫类 Cat
class Cat {
    //属性(成员变量)
    String name;
    String color;
    int age;
}
